package com.zhf.app;

import com.zhf.dao.OrdersDao;
import com.zhf.entity.Orders;
import com.zhf.entity.Product;
import org.junit.Test;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author: ZhaoHuanfeng
 * @Date: 2020/9/27 16:05
 */
public class TestOrdersDao {

    OrdersDao ordersDao=new OrdersDao();

    @Test
    public void testFindAllOrders() throws SQLException {
        List<Orders> allOrders = ordersDao.findAllOrders("001");
        for (Orders orders:allOrders){
            System.out.println(orders);
        }
    }

    @Test
    public void testFindOrderByID() throws SQLException {
        List<Product> order001 = ordersDao.findOrderByID("order001");

        for (Product product:order001){
            System.out.println(product);
        }
    }
}
